package com.ruoyi.util;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "remote-server.sftp")
@Data
public class SftpProperties {
    private String host;
    private int port;
    private String username;
    private String password;
    private String path;

    /**
     * 转换为FileUploadUtil.SftpConfig对象
     */
    public FileUploadUtil.SftpConfig toSftpConfig() {
        return new FileUploadUtil.SftpConfig(host, port, username, password, path);
    }
}
